package xw4g08.voiD;

import java.util.HashMap;
import java.util.Map;

public class FileToEndpoint {
	static private final String[] files = {"modified_1.ttl","modified_2.ttl","modified_3.ttl",
			"modified_4.ttl","modified_5.ttl","modified_6.ttl","modified_7.ttl","modified_8.ttl",
			"modified_9.ttl","modified_10.ttl"};
	static private final String[] uris = {"http://152.78.189.45:8080/openrdf-sesame/repositories/test1",
			"http://152.78.189.58:8080/openrdf-sesame/repositories/test2",
			"http://152.78.189.64:8080/openrdf-sesame/repositories/test3",
			"http://152.78.189.78:8080/openrdf-sesame/repositories/test4",
			"http://152.78.189.85:8080/openrdf-sesame/repositories/test5",
			"http://152.78.189.37:8080/openrdf-sesame/repositories/test6",
			"http://152.78.189.63:8080/openrdf-sesame/repositories/test7",
			"http://152.78.189.126:8080/openrdf-sesame/repositories/test8",
			"http://152.78.189.134:8080/openrdf-sesame/repositories/test9",
			"http://152.78.189.148:8080/openrdf-sesame/repositories/test10"};
	static Map<String,String> map = null;
	
	static private void initial() {
		if(files.length != uris.length) {
			System.out.println("The number of files does not match the number of endpoints.");
			return;
		}
		map = new HashMap<String,String>();
		
		for(int i=0;i<files.length;i++) {
			map.put(files[i],uris[i]);
		}
	}
	
	
	
	static public String getURI(String filename) {
		if(map == null) {
			initial();
		}
		return map.get(filename);
	}
}
